<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<div id="clazzGrid"></div>
<div id="clazzToolbar">
	<div>
		<a href="#" class="easyui-linkbutton" onclick="clazz.toolbar.showAddDialog();" data-options="
		iconCls:'icon-add',
		plain:true">
			新增
		</a>
		<a href="#" class="easyui-linkbutton" onclick="clazz.toolbar.showUpdateDialog();" data-options="
		iconCls:'icon-edit',
		plain:true">
			修改
		</a>
		<a href="#" class="easyui-linkbutton" onclick="clazz.toolbar.updateClazzState();" data-options="
		iconCls:'icon-mini-edit',
		plain:true">
			禁用/启用
		</a>
		<a href="#" class="easyui-linkbutton" onclick="clazz.toolbar.redo();" data-options="
		iconCls:'icon-redo',
		plain:true">
			取消
		</a>
	</div>
	<div>
		<strong>班级：</strong>
		<input type="text" name="clazz" id="clazz"/>
		<strong>状态：</strong>
			<select name="state" id="clazz-state">
				<option value=""></option>
				<option value="1">启用</option>
				<option value="2">禁用</option>
			</select>
		<a href="#" class="easyui-linkbutton" onclick="clazz.toolbar.search()" data-options="
		iconCls:'icon-search',
		plain:true">
			查询
		</a>
	</div>
</div>

<div id="clazzAddDialog" class="easyui-dialog clazz-add" style="width:350px" data-options="
title:'新增班级',
buttons:'#clazzAddButtons',
closed: true,
onClose:clazz.toolbar.resetAddFrom">
	<form id="clazzAddForm" method="post">
		<p>
			<strong>班名：</strong>
			<input type="text" name="name" id="clazzName" class="easyui-textbox" data-options="
			required:true,
			validType:['remote[\'<%=request.getContextPath() %>/ClazzServlet?command=checkClassName\', \'name\']'],
			invalidMessage: '该班级名称非法或已存在'">
		</p>
		<p>
			<strong>课程：</strong>
			<input type="text" id="clazz-menu" name="menu" data-options="
			required:true
			">
		</p>
	</form>
</div>
<div id="clazzAddButtons">
	<a href="#" onclick="clazz.toolbar.add()" class="easyui-linkbutton" data-options="
	iconCls: 'icon-add',
	plain: true">
		新增
	</a>
	<a href="#" onclick="clazz.toolbar.hiddenAddDialog();" class="easyui-linkbutton" data-options="
	iconCls: 'icon-redo',
	plain: true">
		取消
	</a>
</div>

<div id="clazzUpdateDialog" class="easyui-dialog clazz-add" style="width:350px" data-options="
title: '修改班级信息',
buttons: '#clazzUpdateButtons',
closed: true,
onClose: clazz.toolbar.resetUpdateFrom">
	<form id="clazzUpdateForm" method="post">
		<input type="hidden" name="id"/>
		<p>
			<strong>班名：</strong>
			<input type="text" name="name"  id="update-clazzName" class="easyui-textbox" data-options="
			required: true,
			invalidMessage: '该班级名称非法或已存在'
			">
		</p>
		<p>
			<strong>课程：</strong>
			<input type="text" id="clazz-menuUpdate" name="menuUpdate" data-options="
			required:true
			">
		</p>
		<p>
			<strong>状态：</strong>
			<select name="state" class="easyui-combobox">
				<option value="1">启用</option>
				<option value="2">禁用</option>
			</select>
		</p>
	</form>
</div>
<div id="clazzUpdateButtons">
	<a href="#" onclick="clazz.toolbar.update()" class="easyui-linkbutton" data-options="
	iconCls: 'icon-edit',
	plain: true">
		修改
	</a>
	<a href="#" onclick="clazz.toolbar.hiddenUpdateDialog();" class="easyui-linkbutton" data-options="
	iconCls: 'icon-redo',
	plain: true">
		取消
	</a>
</div>
<script>
window.ctx = "<%=request.getContextPath() %>"
</script>
<script type="text/javascript" src="<%=request.getContextPath() %>/static/system/js/clazz.js"></script>
